package Visitor;

public class ComputerPartDisplayVisitor implements ComputerPartVisitor{

    /*
        DisplayVisitor 实现 ComputerVisitor 中的 四个抽象方法, 是一个实现类.
        接口不能 实例化
     */

    @Override
    public void visit(Computer computer) {
        System.out.println(" Visitor displaying computer");
    }

    @Override
    public void visit(Monitor monitor) {
        System.out.println(" Visitor displaying monitor");
    }

    @Override
    public void visit(Mouse mouse) {
        System.out.println(" Visitor displaying mouse");
    }

    @Override
    public void visit(Keyboard keyboard) {
        System.out.println(" Visitor displaying keyboard");
    }

}
